package com.example.store.service;

import com.example.store.entity.Cart;
import com.example.store.vo.CartVO;

import java.nio.file.AccessDeniedException;
import java.util.Date;
import java.util.List;

public interface ICarService {

    /**
     * 将商品添加到购物车
     * @param pid
     * @param num
     * @param uid
     * @param username
     */
    void addToCart(Integer pid, Integer num, Integer uid, String username);
    void updateNumByCid(Integer cid, Integer num, String modifiedUser, Date modifiedTime);
    List<CartVO> getVOByUid(Integer uid);
    List<CartVO> getVOByCids(Integer uid, Integer[] cids);

    Integer addNum (Integer cid,Integer uid, String username) throws AccessDeniedException;
}
